<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * 文章虚拟表
 * Class ArticleView
 * @package App\Models
 */
class ArticleView extends Model
{
    protected $table = 'article_view';

    public function albumInfo(){
        return $this->belongsTo(Album::class, 'album_id', 'id');
    }

    public function groupInfo(){
        return $this->belongsTo(Group::class, 'group_id', 'id');
    }

    public function userInfo(){
        return $this->belongsTo(UserInfo::class, 'user_id', 'id');
    }
}
